package cn.lingyangwl.agile.system.model.entity;

import cn.lingyangwl.agile.model.*;
import cn.lingyangwl.agile.tenant.core.*;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 表单信息
 *
 * @author shenguangyang
 */
@Getter
@Setter
@TableName("diy_form")
@Accessors(chain = true)
@DataIsolation(tableName = "diy_form", filterTenant = true)
public class DiyForm extends BasePlusPO {
    @TableId
	private Long id;

	private Long groupId;

	/**
	 * 数据源id
	 */
	private Long datasourceId;
	
	/**
	 * 表单标识
	 */
	private String code;

	/**
	 * 名称
	 */
	private String name;

	/**
	 * 表名
	 */
	private String tableName;
	
	/**
	 * 提交次数
	 */
	private Long submitCount;
	
	/**
	 * 提交类型, 1 不限制 2 限填一次
	 */
	private String submitType;
	
	/**
	 * 状态
	 */
	private String status;
	
	private Integer sortNo;

	public DiyForm(Long id) {
		this.id = id;
	}

	public DiyForm() {
	}

	public static LambdaQueryWrapper<DiyForm> lqw() {
		return Wrappers.lambdaQuery();
	}
}
